package cn.yuyiling.jelly.qa.api;

import cn.yuyiling.jelly.qa.mongodb.entity.Answer;
import cn.yuyiling.jelly.qa.mongodb.entity.Question;

import java.util.List;

public interface AnswerService {
    Answer createAnswer(String questionId, Answer answer);
    Answer likeAnswer(String id);
    Answer dislikeAnswer(String id);
    Answer updateAnswer(String id, Answer updatedAnswer);
    void deleteAnswersByQuestionId(String questionId);
    void deleteAnswerAndRelatedData(String answerId);
    List<Answer> getTop5HighLikedAnswers();
    List<Answer> getAnswersByQuestionId(String questionId);

    Answer getAnswerById(String id);


    Answer viewAnswerById(String id);
    List<String> get24HourTopViewAnswer(int count);
    void refreshTop24hViewAnswerRanking();

}